#include<bits/stdc++.h>
using namespace std;
int arr[200005];
bool vis[200005];
int main(){
	freopen("fruit.in","r",stdin);
	freopen("fruit.out","w",stdout);
	int n;
	cin>>n;
	for(int i=1;i<=n;++i){
		scanf("%d",arr);
	}
	int n2=n;
	while(n2!=0){
		int b=-1;
		for(int i=1;i<=n;++i){
			if(arr[i]!=b&&!vis[i]){
				vis[i]=1;
				b=arr[i];
				cout<<i<<" ";
				--n2;
			}
		}
		cout<<endl;
	}
	return 0;
}
